<template>
	<tm-app color="#efefef">		
			<view class="flex flex-between pl-30 FormM1">
				<navbar-module title="已治疗工单" :transprent="true"/>
			</view> 
			<tm-sheet :padding="[2,2]" style="margin-top:-100rpx">
				<tm-cell bottomBorder :margin="[0,0]" title="工单编号" :titleFontSize="32">
					<template v-slot:right>
						<tm-text :fontSize="32">{{itemData.code}}</tm-text>
					</template>
				</tm-cell>
				<tm-cell bottomBorder :margin="[0,0]" title="猪仔名称" :titleFontSize="32">
					<template v-slot:right>
						<tm-text :fontSize="32">{{itemData.pig.name}}</tm-text>
					</template>
				</tm-cell>
				<tm-cell bottomBorder :margin="[0,0]" title="所属猪圈" :titleFontSize="32">
					<template v-slot:right>
						<tm-text :fontSize="32">{{itemData.pig.pigsty.name}}</tm-text>
					</template>
				</tm-cell>
				<tm-cell bottomBorder :margin="[0,0]" title="治疗类型" :titleFontSize="32">
					<template v-slot:right>
						<tm-text :fontSize="32">{{itemData.content}}</tm-text>
					</template>
				</tm-cell>
				<tm-cell bottomBorder :margin="[0,0]" title="治疗人员" :titleFontSize="32">
					<template v-slot:right>
						<tm-text :fontSize="32">{{itemData.staff.name}}</tm-text>
					</template>
				</tm-cell>
				<tm-cell bottomBorder :margin="[0,0]" title="治疗时间" :titleFontSize="32">
					<template v-slot:right>
						<tm-text :fontSize="32">{{itemData.completeTime}}</tm-text>
					</template>
				</tm-cell>
			</tm-sheet>
	</tm-app>
</template>

<script setup lang='ts'>
	import { onLoad } from '@dcloudio/uni-app'
	import { ref } from 'vue'
	
	const itemData = ref(null)
	
	onLoad((option)=>{
		itemData.value = JSON.parse(decodeURIComponent(option.data))
	})

</script>

<style>

</style>
